<template>
        <el-table ref="tableRef" :data="tableData" style="width: 100%;" tooltip-effect="dark" :height="tableHeight"
            :header-cell-style="tableHeaderCellStyle">
            <af-table-column prop="dateRange" label="统计时间" align="center" width="300"></af-table-column>
            <af-table-column prop="cityName" label="地市" align="center"></af-table-column>
            <af-table-column prop="monthPeriod" label="统计周期" align="center"></af-table-column>
            <af-table-column prop="p1" label="光路" align="center"></af-table-column>
            <af-table-column prop="p2" label="电源" align="center"></af-table-column>
            <af-table-column prop="p3" label="设备" align="center"></af-table-column>
            <af-table-column prop="p4" label="环境" align="center"></af-table-column>
            <af-table-column prop="p5" label="时钟" align="center"></af-table-column>
            <af-table-column prop="p6" label="其他" align="center"></af-table-column>
            <af-table-column prop="p7" label="退服" align="center"></af-table-column>
        </el-table>
</template>

<script>
    export default {
        props:{
          tableData:{
              type:Array,
              default:()=>[]
          }
        },
        data() {

            return {

            }
        },
        methods:{
          tableHeaderCellStyle({
              row,
              column,
              rowIndex,
              columnIndex
          }) {
              let cellStyle1
              cellStyle1 = 'height:40px; '
              return cellStyle1
          },
        },

        mounted() {
            this.$nextTick(() => {
                if (this.$parent.$refs.tableRef) {
                    this.$parent.$refs.tableRef.doLayout()
                }
            })
        }
    }
</script>

<style>
</style>
